package me.zhengjie.modules.system.service

import me.zhengjie.logging.annotation.Log
import me.zhengjie.modules.system.domain.City
import me.zhengjie.modules.system.service.dto.CityDTO
import me.zhengjie.modules.system.service.dto.CityQueryCriteria
import jakarta.servlet.http.HttpServletResponse
import org.springframework.data.domain.Pageable
import java.io.IOException

/**
 * @author kuki
 * @date 2022-07-21
 */
interface CityService {
    /**
     * 查询数据分页
     * @param criteria 条件参数
     * @param pageable 分页参数
     * @return Map<String></String>,Object>
     */
    fun queryAll(criteria: CityQueryCriteria, pageable: Pageable?): Any?

    /**
     * 查询所有数据不分页
     * @param criteria 条件参数
     * @return List<CityDTO>
    </CityDTO> */
    fun queryAll(criteria: CityQueryCriteria): List<CityDTO>

    /**
     * 根据ID查询
     * @param id ID
     * @return CityDTO
     */
    fun findById(id: Int): CityDTO?
    fun create(resources: City): CityDTO?
    fun update(resources: City)
    fun delete(id: Int)
    fun getCityTree(citys: List<City?>): Any

    @Throws(IOException::class)
    fun download(all: List<CityDTO>, response: HttpServletResponse?)
}